package com.sigmatrix.h5.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.sigmatrix.h5.entity.Enterprise;
import com.sigmatrix.h5.feign.args.SynDealer;
import com.sigmatrix.h5.feign.mode.FranchiserResponse;

@FeignClient(name="data-service")
public interface FranchisersClient {
	
	@PostMapping("/api/franchisers/register")
	public FranchiserResponse regist(@RequestBody SynDealer dealer);
	
	@GetMapping("/api/enterprises/promoCode/{promoCode}")
	public Enterprise getEnterpriseBy(@PathVariable(name="promoCode") String promoCode);
	
}
